package com.app.designpatternslearn.behavior.commandpattern

import com.app.designpatternslearn.behavior.commandpattern.code.BuyShopOrder
import com.app.designpatternslearn.behavior.commandpattern.code.OrderManager
import com.app.designpatternslearn.behavior.commandpattern.code.ReturnShopOrder
import com.app.designpatternslearn.behavior.commandpattern.code.Shop

fun main() {

    val buyShop = Shop()
    buyShop.id = 1
    buyShop.name = "buyShop"

    val returnShop = Shop()
    returnShop.id = 2
    returnShop.name = "returnShop"

    val orderManager = OrderManager()

    orderManager.addOrder(BuyShopOrder(buyShop))
    orderManager.addOrder(ReturnShopOrder(returnShop))

    orderManager.dealOrders()

}